<?php

  $WorkTable = &$_SQL_TABLE[$GlobPart];


  if($_REQUEST['mode'] == $GlobPart)
  {
    $PageTitle = '$language["admin"]["users"]." :: ".$Item["email"];';
  }
  else
  {

  	$PageTitle = '$language["admin"]["users"];';
  	$AloneMode = $GlobPart;

  	$Query['FromTables'] = 	$WorkTable." u

  							";
  	$Query['Fields'] = "u.*";
  	$Query['TabOrder'] = "u.";
  	$Query['Where'] = "";
  	$Query['GroupBy'] = "";


  }


  $_SQL_TABLE_FIELDS[$GlobPart] = array(

				'email' => array(
								'type' => 'input',
								'title' => $language['admin']['email'],
								'addVariable' => $_POST['email'],
								'useInAddForm' => 'y',
								'useInList' => $CONFIG['useInListSort'],
								'required' => $CONFIG['emailPattern'],
								'textUnderField' => '<span class="red">'.$language['admin']['example'].': test@example.com</span>',
								'maxlength' => '50',
								),

				'login' => array(
								'type' => 'input',
								'title' => $language['admin']['login'],
								'addVariable' => $_POST['login'],
								'useInAddForm' => 'y',
								'useInList' => $CONFIG['useInListSort'],
								'required' => $CONFIG['AdminReqPatAll'],
								'maxlength' => '30',
								),

				'firstname' => array(
								'type' => 'input',
								'title' => $language['admin']['firstname'],
								'addVariable' => $_POST['firstname'],
								'useInAddForm' => 'y',
								'useInList' => $CONFIG['useInListSort'],
								'required' => $CONFIG['AdminReqPatAll'],
								'maxlength' => '50',
								),

				'lastname' => array(
								'type' => 'input',
								'title' => $language['admin']['lastname'],
								'addVariable' => $_POST['lastname'],
								'useInAddForm' => 'y',
								'useInList' => $CONFIG['useInListSort'],
								'required' => $CONFIG['AdminReqPatAll'],
								'maxlength' => '50',
								),

				'password' => array(
								'type' => 'input',
								'title' => $language['admin']['password'],
								'useInAddForm' => 'y',
								'addVariable' => $_POST['password'],
								'useInList' => $CONFIG['useInListSort'],
								'required' => $CONFIG['AdminReqPatVariable'],
								'maxlength' => '32',
								'md5' => 'y',
								),

				'birth_date' => array(
								'type' => 'date',
								'title' => $language['admin']['dateOfBirth'],
								'useInAddForm' => 'y',
								'addVariable' => $_POST['birth_date'],
								'useInList' => $CONFIG['useInListSort'],
								'startYear' => '-80',
								'endYear' => '-17',
								'reverseYears' => true,
								'inListSmartyMods' => array('date_format:"%d.%m.%Y"'),
								),

				'gender' => array(
								'type' => 'radio',
								'title' => $language['admin']['gender'],
								'formid' => $CONFIG['activeFormName'],
								'addVariable' => $_POST['gender'],
								'useInAddForm' => 'y',
								'useInList' => $CONFIG['useInListSort'],
								'required' => $CONFIG['AdminReqPatAll'],
								'values' => array(
											'male' => $language['admin']['male'],
											'female' => $language['admin']['female'],
								),
				),



				'send' => array(
								'type' => 'select_link',
								'title' => $language['admin']['sendNewsletters'],
								'formid' => $CONFIG['activeFormName'],
								'addVariable' => 'y',
								'noUseInEdit' => 'y',
								'useInList' => $CONFIG['useInListSort'],
								'inListEdit' => 'select_link',
								'values' => array(
											'y' => array(
													'title' => $language['admin']['yes'],
													'className' => 'active',
													'formFields' => array(
																	'act' => 'status',
																	'varvalue' => 'n',
																	'varname' => 'send',
																	getKeyVarName() => '{$Item.$WorkTableKeyFieldName}',
													),
											),
											'n' => array(
													'title' => $language['admin']['no'],
													'className' => 'inactive',
													'formFields' => array(
																	'act' => 'status',
																	'varvalue' => 'y',
																	'varname' => 'send',
																	getKeyVarName() => '{$Item.$WorkTableKeyFieldName}',
													),
											),
								),
				),

				'active' => array(
								'type' => 'select_link',
								'title' => $language['admin']['status'],
								'formid' => $CONFIG['activeFormName'],
								'addVariable' => $CONFIG['addClientDomainActive'],
								'noUseInEdit' => 'y',
								'useInList' => $CONFIG['useInListSort'],
								'inListEdit' => 'select_link',
								'values' => array(
											'y' => array(
													'title' => $language['admin']['active'],
													'className' => 'active',
													'formFields' => array(
																	'act' => 'status',
																	'varvalue' => 'n',
																	'varname' => 'active',
																	getKeyVarName() => '{$Item.$WorkTableKeyFieldName}',
													),
											),
											'n' => array(
													'title' => $language['admin']['inactive'],
													'className' => 'inactive',
													'formFields' => array(
																	'act' => 'status',
																	'varvalue' => 'y',
																	'varname' => 'active',
																	getKeyVarName() => '{$Item.$WorkTableKeyFieldName}',
													),
											),
								),
				),

				'date' => array(
								'type' => 'value',
								'title' => $language['admin']['date'],
								'addVariable' => 'NOW()',
								'addVarType' => $CONFIG['VarTypeSQLFunction'],
								'useInList' => $CONFIG['useInListSort'],
								'useInListEdit' => 'y',
								'inListSmartyMods' => array('date_format:"%d.%m.%Y"'),
								'inListWzTooltip' => 'y',
								'inListWzTooltipSmartyMods' => array('date_format:"%d.%m.%Y %H:%M:%S"'),
								),

  );

  $_SQL_TABLE_EDIT_FORMS[$GlobPart] = array('active');

  $NoUse['SaveButton'] = 'y';

?>